﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace IESN
{
    /// <summary>
    /// 内存映射实体类
    /// </summary>
    public class DMMapping:Entity
    {
        public DMMapping()
        {
            TableName = "DMMapping";
        }

        private string dmIndex;
        /// <summary>
        /// 地址唯一索引,对应原来TPP中上层业务中的DMObjectIndexName
        /// </summary>
        public string DmIndex
        {
            get { return dmIndex; }
            set { dmIndex = value; }
        }

        private string dmName;
        /// <summary>
        /// 地址名称,对应原来TPP中上层业务中的DMAddressName
        /// </summary>
        public string DmName
        {
            get { return dmName; }
            set { dmName = value; }
        }

        private int condiIndex = 0;
        /// <summary>
        /// 条件索引
        /// </summary>
        public int CondiIndex
        {
            get { return condiIndex; }
            set { condiIndex = value; }
        }

        /// <summary>
        /// 对应PLC内存地址,对应原来TPP中上层业务中的dmAddress
        /// </summary>
        private int dmAddress;
        public int DmAddress
        {
            get { return dmAddress; }
            set { dmAddress = value; }
        }
         
        /// <summary>
        /// 对应PLC地址的长度,对应原来TPP中上层业务中的dmCount
        /// </summary>
        private int dmCount;
        public int DmCount
        {
            get { return dmCount; }
            set { dmCount = value; }
        }

        /// <summary>
        /// 结点类型,对应原来TPP中上层业务中的dmNodeType
        /// </summary>
        private string dmNodeType;
        public string DmNodeType
        {
            get { return dmNodeType; }
            set { dmNodeType = value; }
        }

        /// <summary>
        /// 与其相关联的DM Object ID (对应上层业务中的dmRelationObjectIndex)
        /// </summary>
        private string relationID;
        public string RelationID
        {
            get { return relationID; }
            set { relationID = value; }
        }

        /// <summary>
        /// 内存读写类型,对应原来TPP中上层业务中的dmType
        /// </summary>
        private string dmRWType;
        public string DmRWType
        {
            get { return dmRWType; }
            set { dmRWType = value; }
        }

        /// <summary>
        /// 备注,对应原来TPP中上层业务中的 DMObjectComment
        /// </summary>
        private string comment;
        public string Comment
        {
            get { return comment; }
            set { comment = value; }
        }
    }
}
